Update dependency babel-plugin-tester to v11 #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
10.1.0
->11.0.4
Release Notes
babel-utils/babel-plugin-tester (babel-plugin-tester)
v11.0.4
Compare Source
🪄 Fixes
0306698
][4])v11.0.3
Compare Source
🪄 Fixes
e9ebcdd
][6])v11.0.2
Compare Source
🪄 Fixes
330aa1e
][8])2c4cd84
][9])⚙️ Build System
850d58c
][10])v11.0.1
Compare Source
🪄 Fixes
config
option is still supported byprettierFormatter
([e48badf
][12]) closes [#139][13]v11.0.0
Compare Source
💥 Breaking Changes 💥
error
no longer accepts arbitrary class constructorserror
(akathrows
) no longer accepts arbitrary class constructors. Anyprovided class constructor must extend
Error
, e.g. built-ins likeSyntaxError
or custom error classes likeclass MyError extends Error
. Thanksto the nature of JavaScript, providing a class constructor that does not
extend
Error
will lead to undefined behavior.error
only captures exceptions from Babelerror
(akathrows
) no longer potentially captures exceptions thrown by theformatResult
function. If theformatResult
function throws, the entire testwill fail immediately.
TypeError
for config error;AssertionError
for test errorAll configuration-related issues now throw
TypeError
instead ofAssertionError
.AssertionError
is now exclusively used for failing tests.Additionally, the text of some error messages has been updated.
All test titles are now numbered
All test titles are now numbered (e.g.
"1. ..."
,"2. ..."
, etc), includingfixtures tests and tests with custom titles.
Built-in TypeScript support
TypeScript types are now included within the package itself, obviating the need
to install a separate types package. Installing the old types package alongside
this version of babel-plugin-tester will cause conflicts.
Fixture configuration schema is standardized
In previous versions of babel-plugin-tester, you could provide any key to
options.json
and it would be passed as-is to the plugin under test. This madeit impossible to allow fixtures to be configured with the same flexibility as
test objects. In this version of babel-plugin-tester, fixture
options.json
(and
options.js
) files must return a standard set of options. Non-standardproperties are silently ignored. For instance: to pass options to the plugin
under test, they must be provided via
pluginOptions
.Global
describe
andit
functions must be definedbabel-plugin-tester will refuse to run if
describe
,it
,it.only
, orit.skip
are not globally available.Global
setup
/teardown
no longer overwrites local versionsIn previous versions of babel-plugin-tester, test-level
setup
andteardown
functions overrode global
setup
andteardown
functions. In this version ofbabel-plugin-tester, the global
setup
andteardown
functions will be calledalongside their test-level counterparts for each test and in a well-defined
order (see documentation).
Implicit "global" options merging is no longer supported
In previous versions of babel-plugin-tester, any test object and fixture
configuration option could be passed directly to babel-plugin-tester and apply
"globally" across all test objects and fixtures. This was even the case for
options that made no sense in a "global" context, such as
only
,skip
, andcode
. In this version of babel-plugin-tester, only options explicitly listedin the documentation can be passed directly and applied globally. Unrecognized
"rest" options are silently ignored.
Test/fixture configuration is resolved early and consistently
In previous versions of babel-plugin-tester, test object and fixture
configuration options were resolved in various places, with some options getting
finalized before
it(...)
anddescribe(...)
were called and others beingdetermined as Jest was executing the test. In this version, all configuration
options are resolved and finalized before
it(...)
anddescribe(...)
arecalled. This also means configurations are finalized before hooks like
beforeAll
get called by the testing framework.babelOptions.filename
is now set tofilepath
by default rather than
undefined
.In previous versions, the lodash.mergeWith customizer skipped source properties
that resolved to
undefined
. With this version, the customizer now unsets these properties(sets them to
undefined
), allowing the end user to easily unset defaults (e.g.filename
).Minimum recommended node version bumped from
10.13.0 to 14.20.0
Plugin names are once again automatically determined
by analyzing the return value of the plugin function. Though this is
implemented in a backwards-compatible way, there is a
[small caveat][15].
✨ Features
73b90b3
][16])9d1b321
][17])exec
/execFixture
support via Node's VM module ([4754f42
][18])89b58b5
][20])8c8b858
][22])f54deda
][23])13626d1
][24])f9ad903
][26])titleNumbering
andrestartTitleNumbering
options ([09e792d
][27])setup
/teardown
run order ([4ea283f
][28])4c7c6e7
][29])f214995
][30])🪄 Fixes
2acfe37
][31])481be19
][33])fbb6c19
][35])⚙️ Build System
0bdb351
][37])00712c0
][38])5f588e9
][40])d5b4d9c
][41])🔥 Reverted
0b869bb
][42])🧙🏿 Refactored
undefined
([74af680
][43])0c44392
][44])Configuration
📅 Schedule: Branch creation - "after 9pm on thursday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.